﻿#define _CRT_SECURE_NO_WARNINGS 1
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include<math.h>
#include<stdlib.h>
#include<stdio.h>
#include<unordered_map>
#include<queue>
#include<stack>
#include <functional>
#include<queue>
#include <memory>
using namespace std;

int main() {
    long long n, k;
    cin >> n >> k;
    vector<long long> happy(n);
    auto shame = happy;

    for (int i = 0; i < n; i++)
        cin >> happy[i];
    for (int i = 0; i < n; i++)
        cin >> shame[i];

    long long maxhappy = 0;
    long long minshame = 0xffffff;
    long long day = 0;
    long long left = 0, right = 0;
    long long happy_sum = 0, shame_sum = 0;

    while (right < n)
    {
        happy_sum += happy[right];
        shame_sum += shame[right];
        if (right - left + 1 == k)
        {
            if (happy_sum > maxhappy)
            {
                maxhappy = happy_sum;
                minshame = shame_sum;
                day = left;
            }
            else if (happy_sum == maxhappy && minshame > shame_sum)
            {
                minshame = shame_sum;
                day = left;
            }
            happy_sum -= happy[left];
            shame_sum -= shame[left];
            left++;
        }
        right++;
    }
    cout << day + 1 << endl;
    //cout<<maxhappy<<endl;
    //cout<<minshame<<endl;
    return 0;
}